package com.henu.engineer.config

import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.springframework.web.bind.annotation.ControllerAdvice
import org.springframework.web.bind.annotation.ExceptionHandler
import org.springframework.web.bind.annotation.RestControllerAdvice
import org.springframework.web.servlet.ModelAndView
import java.lang.Exception

/**
 * @author noexcept
 * @date 2021/8/10 0:40
 *
 */
//@ControllerAdvice
class GlobalExceptionHandler {

    val logger: Logger = LoggerFactory.getLogger(javaClass)

    @ExceptionHandler
    fun handleAllException(exception: Exception) {
//        ModelAndView("errorPage").apply { addObject("ex", exception) }
//        logger.error(exception.message)
    }
}